package com.ruoyi.cyinfo.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.cyinfo.domain.InfoUserOther;
import com.ruoyi.cyinfo.service.IInfoUserOtherService;
import com.ruoyi.cyinfo.vo.FrontListVO;
import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.mapper.SysConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 用户其他信息Controller
 * 
 * @author ruoyi
 * @date 2024-03-10
 */
@RestController
@RequestMapping("/wechat/infoUserOthe")
public class WeChatInfoUserOtherController extends BaseController
{
    @Autowired
    private IInfoUserOtherService infoUserOtherService;

    @Autowired
    private SysConfigMapper configMapper;

    /***
     *查询排行
     * @return
     */
    @GetMapping("/selectSort")
    public AjaxResult selectSort(){
        //查询配置
        SysConfig sysConfig = configMapper.selectConfigById(7L);
        List<FrontListVO> frontListVOS =  infoUserOtherService.selectFrontList(sysConfig.getConfigValue());
        return AjaxResult.success(frontListVOS);
    }


}
